package com.arpa.oms.domain.dto;

import com.arpa.oms.domain.entity.OmsGoodsRelationItem;
import com.arpa.wms.domain.entity.Goods;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * OMS组合商品
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="OmsGoodsDTO对象", description="OMS组合商品表")
public class OmsGoodsDTO extends Goods {

    @ApiModelProperty(value = "商品明细")
    @TableField(exist = false)
    @NotEmpty(message = "商品明细不能为空", groups = {OmsGoodsDTO.Save.class, OmsGoodsDTO.Update.class})
    private List<OmsGoodsRelationItem> goodsItems;

    public interface Save{}
    public interface Update{}
}
